@layout("/common/_container.html"){
<style>.ulBox{margin:0;display:flex;padding-left:20px;}.ulBox > li{flex:3;}.ulBox > li > div{margin:10px 0}.ulBox > li > div > span{display:inline-block;width:80px;height:28px;line-height:28px;}.frameBox{width:60%;height:28px;padding-left:10px;border:1px solid #cccccc;border-radius:5px;}.btnBox{background:#f1f1f1;position:fixed;bottom:0;width:100%;padding:5px 0;text-align:center;}.btnBox>button{margin:0;color:white;background:#6090b8;padding:5px 14px;}.btnBox>button:last-of-type{background:white;color:inherit;border:1px solid #999999}</style>
<div class="ibox float-e-margins">
    <div style="display: none">
        <input type="hidden" id="id" value="${id}">
    </div>
    <div>
        <div style="background: #6090b8;color: white;padding: 5px 10px;">修改病种</div>
        <h5 style="color: #30add1;margin: 10px 0 0 10px;">请选择病种</h5>
        <div>
            <ul class="ulBox">
                <li style="flex: 1;">
                    <div>
                        名称
                    </div>
                    <div>
                        <span>访问病种</span>
                    </div>
                    <div>
                        <span>预约项目</span>
                    </div>
                </li>
                <li>
                    <div>
                        原数据
                    </div>
                    <div>
                        <input name="accessDisease1" id="accessDisease1" value="${reservationsInfo.accessDisease}" disabled="disabled" class="frameBox"></input>
                    </div>
                    <div>
                        <input name="appointmentPayService1" id="appointmentPayService1" value="${reservationsInfo.appointmentPayService}" disabled="disabled" class="frameBox"></input>
                    </div>
                </li>
                <li>
                    <div>
                        需改为
                    </div>
                    <div>
                        <select class="frameBox" name="accessDisease" id="accessDisease">
                            <option value="">请选择</option>
                            <option value="种植">种植</option>
                            <option value="正畸">正畸</option>
                            <option value="修复">修复</option>
                            <option value="美白">美白</option>
                            <option value="牙周">牙周</option>
                            <option value="医院类">医院类</option>
                            <option value="拔牙智齿">拔牙智齿</option>
                            <option value="洗牙洁牙">洗牙洁牙</option>
                            <option value="儿童齿科">儿童齿科</option>
                        </select>
                    </div>
                    <div>
                        <select class="frameBox" name="appointmentPayService" id="appointmentPayService">
                            <option value="">请选择</option>
                            @for(str in departmentList){
                            <option value="${str.department}">${str.department}</option>
                            @}
                        </select>
                    </div>
                </li>
            </ul>
        </div>
    </div>
    <div class="btnBox">
        <button class="btn" type="button" onclick="submission()">提交</button>
        <button class="btn" type="button" onclick="parent.layer.close(parent.layer.getFrameIndex(window.name))">取消</button>
    </div>
</div>
</div>
<script >
    function submission() {
        var accessDisease = $("#accessDisease").val();
        var appointmentPayService = $("#appointmentPayService").val();
        var id = $("#id").val();
        $.ajax({
            url: Feng.ctxPath + "/reservationsArrive/update_accessDiseaseOK",
            type: "post",
            data: {
                "accessDisease": accessDisease,
                "appointmentPayService": appointmentPayService,
                "id":id
            },
            success: function(data) {
                Feng.success("修改成功!");
                window.parent.ReservationsArrivedTable.table.refresh();
                parent.layer.close(parent.layer.getFrameIndex(window.name))
            },
            error: function(data) {
                alert('没有权限，请联系系统管理员!');
                parent.layer.close(parent.layer.getFrameIndex(window.name))
            }
        })
    }
</script>
@}